/*
 * Rental.java
 *
 * Created on March 28, 2007, 9:49 AM
 *
 */

package edu.byu.isys413.samlam;

/**
 * The RevenueSource object that represents the backup plan
 * @author Nick
 */
public class Rental extends RevenueSource {
    /**starting date of the rental*/
    private String dateOut;
    /**due date of the rental*/
    private String dateDue;
    //the id of the associated ForRent item
    private String forRent;
    
    /** Creates a new instance of Backup */
    public Rental(String id) {
       super(id);
    }

    /**gets the description
     * @return description of the backup plan
     */
    public String getDescription() {
        return description;
    }
    
    /** sets the description
     *@param description the description of the backup plan
     */
    public void setDescription(String description){
        this.description = description;
        this.dirty = true;
    }
    
    public String getDateOut() {
        return dateOut;
    }

    public void setDateOut(String dateOut) {
        this.dateOut = dateOut;
        this.dirty = true;
    }

    public String getDateDue() {
        return dateDue;
    }

    public void setDateDue(String dateDue) {
        this.dateDue = dateDue;
        this.dirty = true;
    }

    public String getForRent() {
        return forRent;
    }

    public void setForRent(String forRent) {
        this.forRent = forRent;
        this.dirty = true;
    }
    
    public double calculatePrice(double pricePerDay, int numDays){
        double price = pricePerDay * numDays;
        return price;
    }

}
